		$(document).ready(function(){

		var tabs = document.querySelectorAll('header li a');
		var panels = document.querySelectorAll('header article');
		for(i = 0; i < tabs.length; i++) {
			var tab = tabs[i];
			setTabHandler(tab, i);
		}
		function setTabHandler(tab, tabPos) {
		tab.onmousemove = function() {
		for(i = 0; i < tabs.length; i++) {
			tabs[i].className = '';
		}
		tab.className = 'active';
		for(i = 0; i < panels.length; i++) {
			panels[i].className = '';
		}
		panels[tabPos].className = 'active-panel';
		}
		}
		$.ajax({
				type:"get",
				url:"http://localhost/a_world_of_meaty/php/sellList.php",
				async:true,
				dataType:"json",
				success:function(data){
					console.log(data)
					var str = "";
					data.map(function(item,index){
						str+=`<li data-id="${item.goo_id}">
				        		<a href="http://localhost/a_world_of_meaty/html/detail.html?goodsid=${item.goo_id}">
					        	<div class="pt">
					        		<img class="to" src="${item.goo_pic}" />
					        		<div class="mz">
					        			<span style="color:#365424">${item.goo_name}</span><span1 style="color:red">¥${item.goo_price}</span1>
					        		</div>      		
					        		<div class="wenzi">
					        			<span>${item.goo_title}</span>
					        		</div>       		
					        	</div>
					        	</a>
				        	</li>`
					})
					
					$(".sellList").html(str);
				}
			});
		})
